<%@ page language="java" pageEncoding="utf-8" isELIgnored="false"%>

<%String title="课程列表页"; %>

<%@ include file="header.jsp" %>


<!--分类导航START-->
<div class="container-fluid shadow-sm">
	<div class="container p-4 cate-nav" style="">
	  <dl class="row">
	    <dt class="col-1">方向：</dt><dd <c:if test="${empty param.direction}">class="current"</c:if>><a href="course/list.do?direction=&isPay=${param.isPay}&order=${param.order}">全部</a></dd><c:forEach items="${tags1}" var="t"><dd <c:if test="${param.direction eq t.id}">class="current"</c:if>> <a href="course/list.do?direction=${t.id}&isPay=${param.isPay}&order=${param.order}">${t.name}</a></dd></c:forEach>
	  </dl>
	  <c:if test="${!empty tags2}">
	  <dl class="row">
	    <dt class="col-1">标签：</dt><dd <c:if test="${empty param.tag}">class="current"</c:if>><a href="course/list.do?direction=${param.direction}&tag=&isPay=${param.isPay}&order=${param.order}">全部</a></dd><c:forEach items="${tags2}" var="t"><dd <c:if test="${param.tag eq t.id}">class="current"</c:if>><a href="course/list.do?direction=${param.direction}&tag=${t.id}&isPay=${param.isPay}&order=${param.order}">${t.name}</a></dd></c:forEach>
	  </dl>
	  </c:if>
	  <dl class="row">
	    <dt class="col-1">筛选：</dt><dd <c:if test="${empty param.isPay}">class="current"</c:if>><a href="course/list.do?direction=${param.direction}&tag=${param.tag}&isPay=&order=${param.order}">全部</a></dd><dd <c:if test="${param.isPay=='0'}">class="current"</c:if>><a href="course/list.do?direction=${param.direction}&tag=${param.tag}&isPay=0&order=${param.order}">免费课程</a></dd><dd <c:if test="${param.isPay==1}">class="current"</c:if>><a href="course/list.do?direction=${param.direction}&tag=${param.tag}&isPay=1&order=${param.order}">会员课程</a></dd>
	  </dl>
	</div>
</div>
<!--分类导航END-->
<div class="container-fluid bg-light py-3" style="height:500px">
	<div class="container">
		<div class="btn-group" role="group" aria-label="Basic example">
		  <a class="btn <c:if test='${param.order==0}'>text-danger</c:if>" href="course/list.do?direction=${param.direction}&tag=${param.tag}&isPay=${param.isPay}&order=0">最新</a>
		  <a class="btn <c:if test='${param.order==1}'>text-danger</c:if>" href="course/list.do?direction=${param.direction}&tag=${param.tag}&isPay=${param.isPay}&order=1">最热</a>
		</div>

		<div class="clearfix"></div>

		<c:if test="${!empty courses}">
		<c:forEach items="${courses}" var="c">
		<div class="course mt-5">
			<a href="course/detail.do?id=${c.id}"><img src="${c.img}" class="course-img" /></a>
			<p class="my-2 h6"><a href="course/detail?id=${c.id}">${c.title}</a></p>
			<small class="text-muted">${c.subTitle}</small>
			<p class="mt-1"><span class="text-danger">$${c.price}</span><span class="text-secondary pull-right small"><c:if test="${c.isPay==0}">免费课程</c:if><c:if test="${c.isPay==1}">会员课程</c:if></span></p>
		</div>
		</c:forEach>
		</c:if>
		
		<div class="clearfix"></div>
	</div>
</div>

<%@ include file="footer.jsp" %>
</body>
</html>